<?php
namespace app\common\search\tyyh;

/**
 * 提供搜索条件
 */
class UserWallet extends Base{
	protected $request = 'tyyh\\UserWallet';

	public function balance_order_private_list($model, $post) {
		$model->where('uid', $post['uid']);
		$model->append('refund');
		$this->list_order($model, $post);
	}

	public function user_wallet_balance_log($model, $post) {
		$model->where('uid', $post['uid']);
		$this->list_order($model, $post);
	}

	//添加排序条件
    public function list_order($model, $post) {
        if($post['order'] && $post['order_type']) {
            $model->order($post['order'] . ' ' . $post['order_type']);
        }
    }
}
